package com.wuye.entity;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Users entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "users", catalog = "test")
public class Users implements java.io.Serializable {

	// Fields

	private Integer id;
	private String name;
	private String pwd;
	private String zhengjian;
	private String dianhua;
	private String beizhu;
	private Set<Weixiu> weixius = new HashSet<Weixiu>(0);
	private Set<Jiaofei> jiaofeis = new HashSet<Jiaofei>(0);
	private Set<Tousu> tousus = new HashSet<Tousu>(0);
	private Set<Fangchan> fangchans = new HashSet<Fangchan>(0);

	// Constructors

	/** default constructor */
	public Users() {
	}

	/** full constructor */
	public Users(String name, String pwd, String zhengjian, String dianhua,
			String beizhu, Set<Weixiu> weixius, Set<Jiaofei> jiaofeis,
			Set<Tousu> tousus, Set<Fangchan> fangchans) {
		this.name = name;
		this.pwd = pwd;
		this.zhengjian = zhengjian;
		this.dianhua = dianhua;
		this.beizhu = beizhu;
		this.weixius = weixius;
		this.jiaofeis = jiaofeis;
		this.tousus = tousus;
		this.fangchans = fangchans;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "name")
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "pwd")
	public String getPwd() {
		return this.pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	@Column(name = "zhengjian")
	public String getZhengjian() {
		return this.zhengjian;
	}

	public void setZhengjian(String zhengjian) {
		this.zhengjian = zhengjian;
	}

	@Column(name = "dianhua")
	public String getDianhua() {
		return this.dianhua;
	}

	public void setDianhua(String dianhua) {
		this.dianhua = dianhua;
	}

	@Column(name = "beizhu")
	public String getBeizhu() {
		return this.beizhu;
	}

	public void setBeizhu(String beizhu) {
		this.beizhu = beizhu;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "users")
	public Set<Weixiu> getWeixius() {
		return this.weixius;
	}

	public void setWeixius(Set<Weixiu> weixius) {
		this.weixius = weixius;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "users")
	public Set<Jiaofei> getJiaofeis() {
		return this.jiaofeis;
	}

	public void setJiaofeis(Set<Jiaofei> jiaofeis) {
		this.jiaofeis = jiaofeis;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "users")
	public Set<Tousu> getTousus() {
		return this.tousus;
	}

	public void setTousus(Set<Tousu> tousus) {
		this.tousus = tousus;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "users")
	public Set<Fangchan> getFangchans() {
		return this.fangchans;
	}

	public void setFangchans(Set<Fangchan> fangchans) {
		this.fangchans = fangchans;
	}

}